//Weighting C1

#include "stdio.h"
#include "math.h"

bool alg1(int d);
bool alg2(int d);

int main()
{
	int N=0;
	bool f=true;
	if(scanf("%d",&N)!=1||N<0) return printf("ERROR\n"),1;
	f=alg1(N);
	if(f) printf("YES\n");
	else printf("NO\n");
	return 0;
}

//1-st algorithm
	bool alg1(int d)
	{
		if (d%4==2) return false;
		if (d%4<2) if (d/4>0) return alg1(d/4); else return true;
		if (d%4==3) if (d/4>0) return alg2(d/4); else return true;
	}

//2-nd algorithm
	bool alg2(int d)
	{
		if (d%4==1) return false;
		if (d%4>1) if (d/4>0) return alg2(d/4); else return true;
		if (d%4==0) if (d/4>0) return alg1(d/4); else return false;
	}
